﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data;

namespace StuMngVan
{
    public class CommonUtil
    {
        /// <summary>
        /// 【闻祖东 2013-4-2-225633】封装的一个意义在意代码的可重用性。完成一件事情本身是可以很优雅的去做，而不是重复的一些代码重复的写。
        /// </summary>
        /// <param name="comboBox"></param>
        /// <param name="dataSource"></param>
        /// <param name="displayMember"></param>
        /// <param name="valueMember"></param>
        /// 【高月 2013-4-2-233713】已读
        public static void BindData4ComboBox(ComboBox comboBox, DataTable dataSource, string displayMember, string valueMember)
        {
            comboBox.DataSource = dataSource;
            comboBox.DisplayMember = displayMember;
            comboBox.ValueMember = valueMember;
        }
    }
}
